//=========订单.js


function setPresonAddr(evt) {


    h3ui.models.t_customer_order.item.receiver = evt.data.row.receiver_nameb;
    h3ui.models.t_customer_order.item.phone = evt.data.row.mobile;
    h3ui.models.t_customer_order.item.postal = evt.data.row.post;
    h3ui.models.t_customer_order.item.address = evt.data.row.address;


    h3ui.widgets[evt.node.parentId].props.visible = false;

}


function initstart() {
    if (h3ui.$router.currentRoute.query.mode == "detail") {
        var bizObjectId = h3ui.$router.currentRoute.query.clickcloumn;
        h3ui.models.t_customer_order.loadBO({bizObjectId}).then(res => {
            console.log(res);
            h3ui.models.t_customer_order.item = res;
        });
    } else {
        var ids = h3ui.$router.currentRoute.query.ids;
        if (ids) {
            h3ui.services.callOrderInfo({id: ids.split(",")}).then(res => {
                console.log(res);
                h3ui.models.t_customer_order.item = JSON.parse(JSON.stringify(res.data));

            });
        }
    }
}


/**
 * 打开对话框,按钮的id 设置为 xxx_Modalx 如: Buttons_Modal1
 */
function openModal(evt) {
    debugger;
    var modalId = evt.node.id.split("_")[1];
    h3ui.widgets[modalId].props.visible = true;
}

/**
 * 关闭对话框
 */
function closeModal(evt) {
    var modalId = evt.node.id.split("_")[1];
    h3ui.widgets[modalId].props.visible = false;
}
